import React, { Component } from 'react'
import Child6 from '../components/Child6'
import NumContext from  "../Context";

export default class Context extends Component {
    constructor(){
        super();
        this.state = {
            num:9999
        }
    }
  render() {
    return (
      <div>
        <h3>跨层级</h3>
        <NumContext.Provider value={{n:8888}}>
                <Child6 num={this.state.num}></Child6>
        </NumContext.Provider>
     
      </div>
    )
  }
}
